import { createApp } from 'vue'
import './style.css'
import App from './App.vue'
import router from './router/index'
import "vant/lib/index.css";
import { Tabbar, TabbarItem, Form, Field, Icon, NavBar, Button, Popup, DatePicker, CellGroup, Cell, PullRefresh, List, NumberKeyboard, Dialog, Toast, Progress, Divider } from "vant";
import "lib-flexible/flexible";

import dayjs from "dayjs";

const app = createApp(App)
  .use(router).use(TabbarItem)
  .use(Tabbar).use(Form)
  .use(Field).use(Icon)
  .use(NavBar).use(Button)
  .use(Popup).use(DatePicker)
  .use(CellGroup).use(Cell)
  .use(PullRefresh).use(List)
  .use(NumberKeyboard).use(Dialog)
  .use(Toast).use(Progress)
  .use(Divider)


app.mount('#app')

app.config.globalProperties.$filters = {
  transTime(date) {
    return dayjs(Number(date)).format("HH:mm");
  },
  transDay(value) {
    return dayjs(value).format("MM-DD");
  },
  transYDM(value) {
    return dayjs(value).format("YYYY-MM-DD HH:mm");
  },

};
